package coolq.yaozhenyong.controller;

import com.forte.qqrobot.anno.Filter;
import com.forte.qqrobot.anno.Listen;
import com.forte.qqrobot.anno.depend.Beans;
import com.forte.qqrobot.beans.messages.msgget.GroupMsg;
import com.forte.qqrobot.beans.messages.result.BanList;
import com.forte.qqrobot.beans.messages.result.FriendList;
import com.forte.qqrobot.beans.messages.result.GroupInfo;
import com.forte.qqrobot.beans.messages.result.GroupLinkList;
import com.forte.qqrobot.beans.messages.result.GroupList;
import com.forte.qqrobot.beans.messages.result.GroupMemberInfo;
import com.forte.qqrobot.beans.messages.result.GroupMemberList;
import com.forte.qqrobot.beans.messages.result.GroupNoteList;
import com.forte.qqrobot.beans.messages.result.GroupTopNote;
import com.forte.qqrobot.beans.messages.result.LoginQQInfo;
import com.forte.qqrobot.beans.messages.result.ShareList;
import com.forte.qqrobot.beans.messages.result.StrangerInfo;
import com.forte.qqrobot.beans.messages.types.MsgGetTypes;
import com.forte.qqrobot.beans.types.KeywordMatchType;
import com.forte.qqrobot.sender.MsgSender;

@Beans
public class TestGetterController {
	
	/****
	 * 所有方法被抛弃
	 */
	
	/*@Listen(MsgGetTypes.groupMsg)
	@Filter
	public void test(GroupMsg msg,MsgSender msgsender) {
		if(msg.getMsg().equals("踢人")) {
			msgsender.SENDER.sendGroupMsg(msg.getGroup(), msg.getMsg());
			msgsender.SETTER.setGroupMemberKick(msg.getGroup(), "2058308326", false);
			System.out.println("执行了踢人的方法");
		}else if(msg.getMsg().equals("禁言")){
			System.out.println("执行了禁言的方法");
			long ms = 60*60*24;
			msgsender.SENDER.sendGroupMsg(msg.getGroup(), msg.getMsg()+"2058308326");
			msgsender.SETTER.setGroupBan(msg.getGroup(), "2058308326", ms);
		}else if(msg.getMsg().equals("全体禁言")) {
			System.out.println("执行了全体禁言的方法");
			msgsender.SENDER.sendGroupMsg(msg.getGroup(), msg.getGroup());
			msgsender.SETTER.setGroupWholeBan(msg.getGroup(), true);
		}else if(msg.getMsg().equals("解除")) {
			System.out.println("执行了msgsender的方法");
			msgsender.SETTER.setGroupWholeBan(msg.getGroup(), false);
		}else if(msg.getMsg().equals("撤回")) {
			System.out.println("执行了撤回的方法"+msg.getMsg());
			System.out.println(msg.getOriginalData());
			msgsender.SETTER.setMsgRecall(msg.getId());
			msgsender.SETTER.setMsgRecall("45");
		}else if(msg.getMsg().equals("打卡")) {
			System.out.println("执行了打卡");
			msgsender.SETTER.setSign();
		}else if(msg.getMsg().equals("设置")) {
			System.out.println("设置群名片");
			msgsender.SETTER.setGroupCard(msg.getGroup(), msg.getQQ(), "17+123");
		}else if(msg.getMsg().equals("设置群管理")) {
			System.out.println("设置群管理");
			msgsender.SETTER.setGroupAdmin(msg.getGroup(), msg.getQQ(), true);
		}
	}*/
	
/*	@Listen(MsgGetTypes.groupMsg)
	@Filter
	public void mains( GroupMsg msg,MsgSender msgsender) {
		System.out.println(msg.getGroup());
		switch (msg.getMsg()) {
		case "测试1"://无效
			System.out.println("获取封禁成员");
			BanList banList = msgsender.GETTER.getBanList(msg.getGroup());
			break;
		case "测试2"://无效
			System.out.println("获取好友列表");
			FriendList friendList = msgsender.GETTER.getFriendList();
			break;
		case "测试3"://无效
			System.out.println("获取群信息");
			GroupInfo groupInfo = msgsender.GETTER.getGroupInfo(msg.getGroup());
			break;

		case "测试4"://无效
			System.out.println("获取群链接列表");
			 GroupLinkList groupLinkList = msgsender.GETTER.getGroupLinkList(msg.getGroup());
				break;

		case "测试5"://有效
			System.out.println("获取群列表");
			GroupList groupList = msgsender.GETTER.getGroupList();
			break;

		case "测试6"://无效 会直接导致程序卡死
			System.out.println("获取群成员信息");
			GroupMemberInfo groupMemberInfo = msgsender.GETTER.getGroupMemberInfo(msg.getGroup(), msg.getQQ());
			System.out.println(groupMemberInfo.getQQ()+"}"+groupMemberInfo.getOriginalData());
			break;
				
		case "测试7"://无效
			System.out.println("获取群成员列表");
			GroupMemberList groupMemberList = msgsender.GETTER.getGroupMemberList(msg.getGroup());
			break;
		case "测试8"://无效
			System.out.println("获取公告列表");
			GroupNoteList groupNoteList = msgsender.GETTER.getGroupNoteList(msg.getGroup());
			break;
		case "测试9"://无效
			System.out.println("获取置顶公告");
			GroupTopNote groupTopNote = msgsender.GETTER.getGroupTopNote(msg.getGroup());
			break;
		case "测试10"://有效
			System.out.println("获取登录人的QQ信息");
			LoginQQInfo loginQQInfo = msgsender.GETTER.getLoginQQInfo();
			break;
		case "测试11"://无效
			System.out.println("获取共享文件列表");
			ShareList shareList = msgsender.GETTER.getShareList(msg.getGroup());
			break;
		case "测试12"://无效 会直接导致程序卡死
			System.out.println("获取魔神人信息");
			StrangerInfo strangerInfo = msgsender.GETTER.getStrangerInfo("936642284");
			System.out.println(strangerInfo.getQQ()+"}"+strangerInfo.getOriginalData());
			break;
		default:	
			break;
		}
	}*/
}
